package com.simple.javatraining.testing.testinside.answers;

public class Answer {
    private String textOfAnswer;
    
    public Answer(String textOfAnswer) {
    	this.textOfAnswer = textOfAnswer;
    }
    
    public String getTextOfAnswer() {
        return textOfAnswer;
    }

    @Override
    public boolean equals(Object obj) {
        if(!(obj instanceof Answer)) {
            return false;
        }
        return this.textOfAnswer.equals(((Answer) obj).getTextOfAnswer());
    }

    @Override
    public int hashCode() {
        return this.textOfAnswer.hashCode();
    }
}
